const prog = require("commander");
const path = require("path");
const actions = require("./actions");
const tools = require("./tools");
function createCommand() {
	prog.program
		.command("create <project> [otherArgs...]")
		.description("创建一个基于模板的基础项目")
		.action(actions.createAction);
	prog.program
		.command("addPage <pageName>")
		.description("默认在 src/pages 下创建一个页面")
		.action(actions.addPageAction);
	prog.program
		.command("addStore <storeName>")
		.description("默认在 src/store/modules 下创建一个模块")
		.action(actions.addStore);
	prog.program
		.command("addCpns <componentsName>")
		.description("默认在 src/components 下创建一个组件")
		.action(actions.addComponents);
	prog.program
		.command("list")
		.description("显示所有的配置")
		.action(actions.showConfig);
	prog.program
		.command("fy")
		.description("翻译剪贴板中的英文,选择 -w 会将翻译写入你的剪贴板")
		.action(tools.translate);
	prog.program
		.command("test")
		.description("用于测试")
		.action(() => {
			console.log(prog.program.opts());
		});
}
module.exports = createCommand;
